<?php
require_once('./application/models/itemModel.php');

	abstract class item_abstract
	{
		
		protected $information;
		protected $Db;
		protected $model;
		
		
		public function __construct($iDb = NULL)
		{
			$this -> Db = $iDb;
			$this -> information = array(
										 'id'		=> '',
										 'title' 	=> '',
										 'datum' 	=> '',
										 'geb_naam' => '',
										 'geb_id' 	=> '',
										 'user'		=> '',
										 
										 );	
			$this -> init();
			$this -> model = itemModel::getInstance($this -> Db);
		}
		protected function init()
		{
			
		}
		public function __set($varName , $varValue)
		{
			if (array_key_exists($varName,$this -> information)){
				$this ->information [$varName] = $varValue;
			}
			
		}
		public function __get($varName){
	
			if (array_key_exists($varName, $this -> information)){
				return $this -> information[$varName];
			}
		}
		
		public function verwijder(){
		
			$this -> model -> verwijder($this);
		
		}
		
		
		
		
	}


?>